home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / Disks.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-22  |  2.4 KB  |  108 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        Disks.h
  3.  
  4.      Contains:    Disk Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __DISKS__
  21. #define __DISKS__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __OSUTILS__
  30. #include <OSUtils.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33. /*    #include <Memory.h>                                            */
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_ALIGN_SUPPORTED
  40. #pragma options align=mac68k
  41. #endif
  42.  
  43. #if PRAGMA_IMPORT_SUPPORTED
  44. #pragma import on
  45. #endif
  46.  
  47.  
  48. enum {
  49.     sony,
  50.     hard20
  51. };
  52.  
  53. struct DrvSts {
  54.     short                            track;                        /* current track */
  55.     char                            writeProt;                    /* bit 7 = 1 if volume is locked */
  56.     char                            diskInPlace;                /* disk in drive */
  57.     char                            installed;                    /* drive installed */
  58.     char                            sides;                        /* -1 for 2-sided, 0 for 1-sided */
  59.     QElemPtr                        qLink;                        /* next queue entry */
  60.     short                            qType;                        /* 1 for HD20 */
  61.     short                            dQDrive;                    /* drive number */
  62.     short                            dQRefNum;                    /* driver reference number */
  63.     short                            dQFSID;                        /* file system ID */
  64.     char                            twoSideFmt;                    /* after 1st rd/wrt: 0=1 side, -1=2 side */
  65.     char                            needsFlush;                    /* -1 for MacPlus drive */
  66.     short                            diskErrs;                    /* soft error count */
  67. };
  68. typedef struct DrvSts DrvSts;
  69.  
  70. struct DrvSts2 {
  71.     short                            track;
  72.     char                            writeProt;
  73.     char                            diskInPlace;
  74.     char                            installed;
  75.     char                            sides;
  76.     QElemPtr                        qLink;
  77.     short                            qType;
  78.     short                            dQDrive;
  79.     short                            dQRefNum;
  80.     short                            dQFSID;
  81.     short                            driveSize;
  82.     short                            driveS1;
  83.     short                            driveType;
  84.     short                            driveManf;
  85.     short                            driveChar;
  86.     char                            driveMisc;
  87.     SInt8                            filler;
  88. };
  89. typedef struct DrvSts2 DrvSts2;
  90.  
  91. extern pascal OSErr DiskEject(short drvNum);
  92. extern pascal OSErr SetTagBuffer(void *buffPtr);
  93. extern pascal OSErr DriveStatus(short drvNum, DrvSts *status);
  94.  
  95. #if PRAGMA_IMPORT_SUPPORTED
  96. #pragma import off
  97. #endif
  98.  
  99. #if PRAGMA_ALIGN_SUPPORTED
  100. #pragma options align=reset
  101. #endif
  102.  
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106.  
  107. #endif /* __DISKS__ */
  108.